# Constants File
from django.contrib.gis.gdal.field import *

# Region Type Choices
REGION_TYPE_CHOICE_CD = 'CD'
REGION_TYPE_CHOICE_USER = 'USER'
REGION_TYPE_CHOICE_USER_LGA_SUBURB = 'SP' # Special
REGION_TYPE_CHOICE_SUBURB = 'SUB'
REGION_TYPE_CHOICE_LGA = 'LGA'
REGION_TYPE_CHOICE_METRO = 'METRO'
REGION_TYPE_CHOICE_CITY = 'CITY'
REGION_TYPE_CHOICE_STATE = 'STATE'
REGION_TYPE_CHOICE_COUNTRY = 'COUNTRY'

REGION_TYPE_CHOICES = (
    (REGION_TYPE_CHOICE_CD, 'Census District'),
    (REGION_TYPE_CHOICE_USER, 'Custom User Region'),
    (REGION_TYPE_CHOICE_USER_LGA_SUBURB, 'Custom User Region'),
    (REGION_TYPE_CHOICE_SUBURB, 'Suburb'),
    (REGION_TYPE_CHOICE_LGA, 'Local Government Area'),
    (REGION_TYPE_CHOICE_METRO, 'Metropolitan Region'),
    (REGION_TYPE_CHOICE_CITY, 'City'),
    (REGION_TYPE_CHOICE_STATE, 'State'),
    (REGION_TYPE_CHOICE_COUNTRY, 'Country')
)

# ABS Region Population Choices
ABS_POPULATION_TYPE_CHOICE_LGA = 'LGA'
ABS_POPULATION_TYPE_CHOICE_SUBURB = 'SUB'

ABS_POPULATION_TYPE_CHOICES = (
    (ABS_POPULATION_TYPE_CHOICE_LGA, 'Local Government Area'),
    (ABS_POPULATION_TYPE_CHOICE_SUBURB, 'Suburb')
)

# POS Type Choices
POS_TYPE_C_CHOICE_PARK = 1
POS_TYPE_C_CHOICE_NATURAL = 2
POS_TYPE_C_CHOICE_RESIDUAL_GREEN_SPACE = 3
POS_TYPE_C_CHOICE_SCHOOL_GROUNDS = 4
POS_TYPE_C_CHOICE_CLUB_OR_PAY = 5

POS_TYPE_C_CHOICES = (
    (POS_TYPE_C_CHOICE_PARK, 'Park'),
    (POS_TYPE_C_CHOICE_NATURAL, 'Natural'),
    (POS_TYPE_C_CHOICE_RESIDUAL_GREEN_SPACE, 'Residual Green Space'),
    (POS_TYPE_C_CHOICE_SCHOOL_GROUNDS, 'School Grounds'),
    (POS_TYPE_C_CHOICE_CLUB_OR_PAY, 'Club or Pay Facilities'),
)

# Park Type Choices
PARK_TYPE_CHOICE_POCKET = 6
PARK_TYPE_CHOICE_SMALL = 7
PARK_TYPE_CHOICE_MEDIUM = 8
PARK_TYPE_CHOICE_LARGE_1 = 9
PARK_TYPE_CHOICE_LARGE_2 = 10
PARK_TYPE_CHOICE_DISTRICT_1 = 11
PARK_TYPE_CHOICE_DISTRICT_2 = 12
PARK_TYPE_CHOICE_REGIONAL = 13

PARK_TYPE_CHOICES = (
    (PARK_TYPE_CHOICE_POCKET, 'Pocket Park'),
    (PARK_TYPE_CHOICE_SMALL, 'Small Neighbourhood Park'),
    (PARK_TYPE_CHOICE_MEDIUM, 'Medium Neighbourhood Park'),
    (PARK_TYPE_CHOICE_LARGE_1, 'Large Neighbourhood Park 1'),
    (PARK_TYPE_CHOICE_LARGE_2, 'Large Neighbourhood Park 2'),
    (PARK_TYPE_CHOICE_DISTRICT_1, 'District Park 1'),
    (PARK_TYPE_CHOICE_DISTRICT_2, 'District Park 2'),
    (PARK_TYPE_CHOICE_REGIONAL, 'Regional Park'),
)

# DSR Type Choices
#DSR_TYPE_CHOICE_NONE = 1
DSR_TYPE_CHOICE_POCKET = 16
DSR_TYPE_CHOICE_LOCAL = 17
DSR_TYPE_CHOICE_NEIGHBOURHOOD = 18
DSR_TYPE_CHOICE_DISTRICT = 19
DSR_TYPE_CHOICE_REGIONAL = 20

DSR_TYPE_CHOICES = (
    #(DSR_TYPE_CHOICE_NONE, 'None'),
    (DSR_TYPE_CHOICE_POCKET, 'Pocket Open Space'),
    (DSR_TYPE_CHOICE_LOCAL, 'Local Open Space'),
    (DSR_TYPE_CHOICE_NEIGHBOURHOOD, 'Neighbourhood Park'),
    (DSR_TYPE_CHOICE_DISTRICT, 'District Open Space'),
    (DSR_TYPE_CHOICE_REGIONAL, 'Regional Open Space'),
)

# Extra Statistic Type Choices
STAT_TYPE_CHOICE_TOTAL_PARKS = POS_TYPE_C_CHOICE_PARK
STAT_TYPE_CHOICE_TOTAL_DSR = 1
STAT_TYPE_CHOICE_TOTAL_POS = 14
STAT_TYPE_CHOICE_TOTAL_POS_PLUS_SCHOOLS = 15

# Downloadable Stat Type Choices
STAT_TYPE_CHOICES = (
    (STAT_TYPE_CHOICE_TOTAL_PARKS, 'Parks'),
    (STAT_TYPE_CHOICE_TOTAL_DSR, 'DSR POS'),
    (PARK_TYPE_CHOICE_POCKET, 'Pocket Park'),
    (PARK_TYPE_CHOICE_SMALL, 'Small Neighbourhood Park'),
    (PARK_TYPE_CHOICE_MEDIUM, 'Medium Neighbourhood Park'),
    (PARK_TYPE_CHOICE_LARGE_1, 'Large Neighbourhood Park 1'),
    (PARK_TYPE_CHOICE_LARGE_2, 'Large Neighbourhood Park 2'),
    (PARK_TYPE_CHOICE_DISTRICT_1, 'District Park 1'),
    (PARK_TYPE_CHOICE_DISTRICT_2, 'District Park 2'),
    (PARK_TYPE_CHOICE_REGIONAL, 'Regional Park'),
    (DSR_TYPE_CHOICE_POCKET, 'Pocket Open Space'),
    (DSR_TYPE_CHOICE_LOCAL, 'Local Open Space'),
    (DSR_TYPE_CHOICE_NEIGHBOURHOOD, 'Neighbourhood Park'),
    (DSR_TYPE_CHOICE_DISTRICT, 'District Open Space'),
    (DSR_TYPE_CHOICE_REGIONAL, 'Regional Open Space'),
    (POS_TYPE_C_CHOICE_NATURAL, 'Natural'),
    (POS_TYPE_C_CHOICE_RESIDUAL_GREEN_SPACE, 'Residual Green Space'),
    (STAT_TYPE_CHOICE_TOTAL_POS, 'Total POS*'),
    (POS_TYPE_C_CHOICE_SCHOOL_GROUNDS, 'School Grounds'),
    (STAT_TYPE_CHOICE_TOTAL_POS_PLUS_SCHOOLS, 'Total POS* + School Grounds'),
)

# Park Survey Type Choices
SURVEY_FULL = 1
SURVEY_MINI = 2
SURVEY_TYPE_CHOICES = (
    (SURVEY_FULL, 'Full POSDAT Survey Completed'),
    (SURVEY_MINI, 'Mini POSDAT Survey Completed'),
)

# Paid Sporting Facility Adjacency Choices
PSF_ADJACENT = 1
PSF_NOT_ADJACENT = 2
PSF_CHOICES = (
    (PSF_ADJACENT, 'Adjacent to a Paid Sporting Facility'),
    (PSF_NOT_ADJACENT, 'Not adjacent to a Paid Sporting Facility'),
)

# Bush Forever Facility Adjacency Choices
BF_ADJACENT = 1
BF_NOT_ADJACENT = 2
BF_CHOICES = (
    (BF_ADJACENT, 'Adjacent to or containing a Bush Forever area'),
    (BF_NOT_ADJACENT, 'Not adjacent to or containing a Bush Forever area'),
)

# POS Facility Choices
POS_FACILITY_CHOICE_TENNIS = 'TENNIS'
POS_FACILITY_CHOICE_SOCCER = 'SOCCER'
POS_FACILITY_CHOICE_FOOTBALL = 'FOOTBALL'
POS_FACILITY_CHOICE_NETCOURT = 'NETCOURT'
POS_FACILITY_CHOICE_CRICKET = 'CRICKET'
POS_FACILITY_CHOICE_BASEBALL = 'BASEBALL'
POS_FACILITY_CHOICE_FITNESS = 'FITNESS'
POS_FACILITY_CHOICE_BASKETHOOP = 'BASKETHOOP'
POS_FACILITY_CHOICE_HOCKEY = 'HOCKEY'
POS_FACILITY_CHOICE_ATHLETICS = 'ATHLETICS'
POS_FACILITY_CHOICE_RUGBY = 'RUGBY'
POS_FACILITY_CHOICE_SKATEBMX = 'SKATEBMX'
POS_FACILITY_CHOICE_OTHER = 'OTHER'
POS_FACILITY_CHOICE_PLAYGROUND = 'PLAYGROUND'
POS_FACILITY_CHOICE_FORESHORE = 'FORESHORE'
POS_FACILITY_CHOICE_LAKEPOND = 'LAKEPOND'
POS_FACILITY_CHOICE_FOUNTAIN = 'FOUNTAIN'
POS_FACILITY_CHOICE_STREAM = 'STREAM'
POS_FACILITY_CHOICE_WETLAND = 'WETLAND'
POS_FACILITY_CHOICE_WILDLIFE = 'WILDLIFE'
POS_FACILITY_CHOICE_GARDENS = 'GARDENS'
POS_FACILITY_CHOICE_NOTHING = 'NOTHING'
POS_FACILITY_CHOICE_TREES = 'TREES'
POS_FACILITY_CHOICE_PATHS = 'PATHS'
POS_FACILITY_CHOICE_PATHSHADE = 'PATHSHADE'
# POS_FACILITY_CHOICE_PATHSHADE0 = 'PATHSHADE0'
# POS_FACILITY_CHOICE_PATHSHADE1 = 'PATHSHADE1'
# POS_FACILITY_CHOICE_PATHSHADE2 = 'PATHSHADE2'
# POS_FACILITY_CHOICE_PATHSHADE3 = 'PATHSHADE3'
POS_FACILITY_CHOICE_PLAYSHADE = 'PLAYSHADE'
POS_FACILITY_CHOICE_PLAYFENCE = 'PLAYFENCE'
POS_FACILITY_CHOICE_GRASSRETIC = 'GRASSRETIC'
POS_FACILITY_CHOICE_DOGS = 'DOGS'
POS_FACILITY_CHOICE_BBQ = 'BBQ'
POS_FACILITY_CHOICE_SEAT = 'SEAT'
POS_FACILITY_CHOICE_PICNIC = 'PICNIC'
POS_FACILITY_CHOICE_KIOSK = 'KIOSK'
POS_FACILITY_CHOICE_TOILETS = 'TOILETS'
POS_FACILITY_CHOICE_ART = 'ART'
POS_FACILITY_CHOICE_CARPARK = 'CARPARK'
POS_FACILITY_CHOICE_LIGHTING = 'LIGHTING'
POS_FACILITY_CHOICE_LIGHTFEAT = 'LIGHTFEAT'
# POS Facilities Stats Choices
POS_FACILITY_STAT_CHOICE_PLAYFENCE_NO_0 = 'PLAYFENCEno0'
POS_FACILITY_STAT_CHOICE_PLAYFENCE_YES_1 = 'PLAYFENCEyes1'
POS_FACILITY_STAT_CHOICE_DOGS_NO_0 = 'DOGSno0'
POS_FACILITY_STAT_CHOICE_DOGS_YES_1 = 'DOGSyes1'
POS_FACILITY_STAT_CHOICE_DOGS_NO_INFO_2 = 'DOGSnoinfo2'
POS_FACILITY_STAT_CHOICE_PLAYSHADE_PARTIAL_1 = 'PLAYSHADEpartial1'
POS_FACILITY_STAT_CHOICE_PLAYSHADE_FULL_2 = 'PLAYSHADEfull2'
POS_FACILITY_STAT_CHOICE_TREES_NO_0 = 'TREESno0'
POS_FACILITY_STAT_CHOICE_TREES_YES_1_50_1 = 'TREESy1501'
POS_FACILITY_STAT_CHOICE_TREES_YES_50_100_2 = 'TREESy501002'
POS_FACILITY_STAT_CHOICE_TREES_YES_MORE_100_3 = 'TREESymo1003'
POS_FACILITY_STAT_CHOICE_PATHSHADE_NO_0 = 'PATHSHADEn0'
POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_POOR_1 = 'PATHSHADEypoor1'
POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_MEDIUM_2 = 'PATHSHADEymedium2'
POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_GOOD_3 = 'PATHSHADEygood3'
POS_FACILITY_STAT_CHOICE_ADJ_PSF = 'adj_PSF'

POS_FACILITY_CHOICES = (
    (POS_FACILITY_CHOICE_TENNIS, 'Tennis'),
    (POS_FACILITY_CHOICE_SOCCER, 'Soccer'),
    (POS_FACILITY_CHOICE_FOOTBALL, 'Football'),
    (POS_FACILITY_CHOICE_NETCOURT, 'Basketball/netball courts'),
    (POS_FACILITY_CHOICE_CRICKET, 'Cricket'),
    (POS_FACILITY_CHOICE_BASEBALL, 'Baseball'),
    (POS_FACILITY_CHOICE_FITNESS, 'Fitness circuit'),
    (POS_FACILITY_CHOICE_BASKETHOOP, 'Basketball/netball hoops'),
    (POS_FACILITY_CHOICE_HOCKEY, 'Hockey'),
    (POS_FACILITY_CHOICE_ATHLETICS, 'Athletics'),
    (POS_FACILITY_CHOICE_RUGBY, 'Rugby'),
    (POS_FACILITY_CHOICE_SKATEBMX, 'Skate Park'),
    (POS_FACILITY_CHOICE_OTHER, 'Other'),
    (POS_FACILITY_CHOICE_PLAYGROUND, 'Playground'),
    (POS_FACILITY_CHOICE_PLAYSHADE, 'Shade'),
    (POS_FACILITY_CHOICE_PLAYFENCE, 'Fenced'),
    (POS_FACILITY_CHOICE_FORESHORE, 'On a beach/river foreshore'),
    (POS_FACILITY_CHOICE_LAKEPOND, 'Lake/Pond'),
    (POS_FACILITY_CHOICE_FOUNTAIN, 'Water Fountain'),
    (POS_FACILITY_CHOICE_STREAM, 'Stream'),
    (POS_FACILITY_CHOICE_WETLAND, 'Wetlands'),
    (POS_FACILITY_CHOICE_WILDLIFE, 'Other wildlife'),
    (POS_FACILITY_CHOICE_GARDENS, 'Gardens'),
    (POS_FACILITY_CHOICE_NOTHING, 'Nothing'),
    (POS_FACILITY_CHOICE_TREES, 'Trees'),
    (POS_FACILITY_CHOICE_PATHS, 'Walking Paths'),
    (POS_FACILITY_CHOICE_PATHSHADE, 'Shade on paths'),
    # (POS_FACILITY_CHOICE_PATHSHADE0, 'No shade on paths'),
    # (POS_FACILITY_CHOICE_PATHSHADE1, 'Poor shade on paths'),
    # (POS_FACILITY_CHOICE_PATHSHADE2, 'Medium shade on paths'),
    # (POS_FACILITY_CHOICE_PATHSHADE3, 'Good shade on paths'),
    (POS_FACILITY_CHOICE_GRASSRETIC, 'Grass reticulated'),
    (POS_FACILITY_CHOICE_DOGS, 'Dogs'),
    (POS_FACILITY_CHOICE_BBQ, 'BBQ Facilities'),
    (POS_FACILITY_CHOICE_SEAT, 'Seating'),
    (POS_FACILITY_CHOICE_PICNIC, 'Picnic Tables'),
    (POS_FACILITY_CHOICE_KIOSK, 'Kiosk/Cafe'),
    (POS_FACILITY_CHOICE_TOILETS, 'Public access toilets'),
    (POS_FACILITY_CHOICE_ART, 'Public Art'),
    (POS_FACILITY_CHOICE_CARPARK, 'Car Parking'),
    (POS_FACILITY_CHOICE_LIGHTING, 'Lighting'),
    (POS_FACILITY_CHOICE_LIGHTFEAT, 'Lighting - around courts, buildings, BBQ and play equipment'),
)

# Additional Facility Statistics Choices
POS_FACILITY_STAT_CHOICES = (
    (POS_FACILITY_STAT_CHOICE_PLAYFENCE_NO_0, 'Playground: No Fence'),
    (POS_FACILITY_STAT_CHOICE_PLAYFENCE_YES_1, 'Playground: Fenced'),
    (POS_FACILITY_STAT_CHOICE_DOGS_NO_0, 'Dogs: Not Allowed'),
    (POS_FACILITY_STAT_CHOICE_DOGS_YES_1, 'Dogs: Allowed'),
    (POS_FACILITY_STAT_CHOICE_DOGS_NO_INFO_2, 'Dogs: No Information'),
    (POS_FACILITY_STAT_CHOICE_PLAYSHADE_PARTIAL_1, 'Playground: Partial Shade'),
    (POS_FACILITY_STAT_CHOICE_PLAYSHADE_FULL_2, 'Playground: Full Shade'),
    (POS_FACILITY_STAT_CHOICE_TREES_NO_0, 'Trees: None'),
    (POS_FACILITY_STAT_CHOICE_TREES_YES_1_50_1, 'Trees: 1-50'),
    (POS_FACILITY_STAT_CHOICE_TREES_YES_50_100_2, 'Trees: 50-100'),
    (POS_FACILITY_STAT_CHOICE_TREES_YES_MORE_100_3, 'Trees: More than 100'),
    (POS_FACILITY_STAT_CHOICE_PATHSHADE_NO_0, 'No shade on paths'),
    (POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_POOR_1, 'Poor shade on paths'),
    (POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_MEDIUM_2, 'Medium shade on paths'),
    (POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_GOOD_3, 'Good shade on paths'),
    (POS_FACILITY_STAT_CHOICE_ADJ_PSF, 'Adjacent Paid Sporting Facility'),
)

# Category types (of Facilities) - for Address Results summary page
CATEGORY_DOGS = 'Dogs'
CATEGORY_GENERAL = 'General Amenities'
CATEGORY_NATURE = 'Nature'
CATEGORY_PLAYGROUND = 'Playground'
CATEGORY_SKATE_PARK = 'Skate Park'
CATEGORY_SPORTING = 'Sporting'
# Category <-> Facility Mapping
CATEGORY_FACILITY_MAPPING = [
    {CATEGORY_DOGS :     [
        POS_FACILITY_CHOICE_DOGS
    ]},
    {CATEGORY_GENERAL :  [
        POS_FACILITY_CHOICE_PATHS,
        POS_FACILITY_CHOICE_PATHSHADE,
        # POS_FACILITY_CHOICE_PATHSHADE0,
        # POS_FACILITY_CHOICE_PATHSHADE1,
        # POS_FACILITY_CHOICE_PATHSHADE2,
        # POS_FACILITY_CHOICE_PATHSHADE3,
        POS_FACILITY_CHOICE_LIGHTING,
        POS_FACILITY_CHOICE_LIGHTFEAT,
        POS_FACILITY_CHOICE_BBQ,
        POS_FACILITY_CHOICE_SEAT,
        POS_FACILITY_CHOICE_PICNIC,
        POS_FACILITY_CHOICE_KIOSK,
        POS_FACILITY_CHOICE_TOILETS,
        POS_FACILITY_CHOICE_ART,
        POS_FACILITY_CHOICE_CARPARK
    ]},
    {CATEGORY_NATURE :   [
        POS_FACILITY_CHOICE_FORESHORE,
        POS_FACILITY_CHOICE_LAKEPOND,
        POS_FACILITY_CHOICE_FOUNTAIN,
        POS_FACILITY_CHOICE_STREAM,
        POS_FACILITY_CHOICE_WETLAND,
        POS_FACILITY_CHOICE_WILDLIFE,
        POS_FACILITY_CHOICE_GARDENS,
        POS_FACILITY_CHOICE_TREES
    ]},
    {CATEGORY_PLAYGROUND:[
        POS_FACILITY_CHOICE_PLAYGROUND
    ]},
    {CATEGORY_SKATE_PARK :[
        POS_FACILITY_CHOICE_SKATEBMX
    ]},
    {CATEGORY_SPORTING : [
        POS_FACILITY_CHOICE_TENNIS,
        POS_FACILITY_CHOICE_SOCCER,
        POS_FACILITY_CHOICE_FOOTBALL,
        POS_FACILITY_CHOICE_NETCOURT,
        POS_FACILITY_CHOICE_CRICKET,
        POS_FACILITY_CHOICE_BASEBALL,
        POS_FACILITY_CHOICE_FITNESS,
        POS_FACILITY_CHOICE_BASKETHOOP,
        POS_FACILITY_CHOICE_HOCKEY,
        POS_FACILITY_CHOICE_ATHLETICS,
        POS_FACILITY_CHOICE_RUGBY,
    ]}
]


# Categories for data display in Park Facilities table
CATEGORY_DISPLAY_SPORTING = 'sporting'
##CATEGORY_DISPLAY_PLAYGROUND = 'playground'
CATEGORY_DISPLAY_WATER = 'water'
CATEGORY_DISPLAY_LIGHTS = 'light'
##CATEGORY_DISPLAY_PATHS = 'walking paths'
# Category <-> Facility Display Mapping
CATEGORY_DISPLAY_FACILITY_MAPPING = [
    {CATEGORY_DISPLAY_SPORTING  : [
        POS_FACILITY_CHOICE_TENNIS,
        POS_FACILITY_CHOICE_SOCCER,
        POS_FACILITY_CHOICE_FOOTBALL,
        POS_FACILITY_CHOICE_NETCOURT,
        POS_FACILITY_CHOICE_CRICKET,
        POS_FACILITY_CHOICE_BASEBALL,
        POS_FACILITY_CHOICE_FITNESS,
        POS_FACILITY_CHOICE_BASKETHOOP,
        POS_FACILITY_CHOICE_HOCKEY,
        POS_FACILITY_CHOICE_ATHLETICS,
        POS_FACILITY_CHOICE_RUGBY
    ]},
##    {CATEGORY_DISPLAY_PLAYGROUND: [
##       POS_FACILITY_CHOICE_PLAYSHADE,
##       POS_FACILITY_CHOICE_PLAYFENCE
##    ]},
    {CATEGORY_DISPLAY_WATER     : [
        POS_FACILITY_CHOICE_LAKEPOND,
        POS_FACILITY_CHOICE_FOUNTAIN,
        POS_FACILITY_CHOICE_STREAM,
        POS_FACILITY_CHOICE_WETLAND
    ]},
    {CATEGORY_DISPLAY_LIGHTS    : [
        POS_FACILITY_CHOICE_LIGHTING,
        POS_FACILITY_CHOICE_LIGHTFEAT
    ]},
##    {CATEGORY_DISPLAY_PATHS     : [
##                            POS_FACILITY_CHOICE_PATHSHADE
##    ]}
]

# POS Presence Mappings
POS_GENERAL_MAPPING = {
    0 : 'No',
    1 : 'Yes'
}
POS_TREES_MAPPING = {
    0 : 'No',
    1 : '1-50 trees',
    2 : '50-100 trees',
    3 : 'More than 100 trees'
}
POS_PATHSHADE_MAPPING = {
    0 : 'No',
    1 : 'Poor',
    2 : 'Medium',
    3 : 'Good'
}
POS_PLAYSHADE_MAPPING = {
    0 : 'No',
    1 : 'Partial',
    2 : 'Full'
}
POS_DOGS_MAPPING = {
    0 : 'Dogs not allowed',
    1 : 'Dogs allowed',
    2 : 'No information'
}
POS_LIGHTFEATURES_MAPPING = {
    0 : 'No',
    1 : 'Around park amenities, courts or buildings'
}

# List of fields to check for each uploaded file's table
POS_FIELDS = {
    'description' : 'POS Shapefile',
    'posid' : OFTInteger,
    'partid' : OFTInteger,
    'uid': OFTString,
    'pos_type_c' : OFTInteger,
    'park_name' : OFTString,
    'park_type' : OFTInteger,
    'dsr_type' : OFTInteger,
    'pos_dat' : OFTInteger,
    'adj_psf' : OFTInteger,
    'adj_bf' : OFTInteger,
    'qual_child' : OFTInteger,
    'qual_adole' : OFTInteger,
    'qual_adult' : OFTInteger
}
SUBURB_FIELDS = {
    'description' : 'Suburb Shapefile',
    'ssc_code' : OFTString,
    'name' : OFTString
}
LGA_FIELDS = {
    'description' : 'LGA Shapefile',
    'lga_code' : OFTString,
    'name' : OFTString,
    'short_name' : OFTString
}
METRO_AREA_FIELDS = {
    'description' : 'Metro Area Shapefile',
    'id' : OFTInteger,
    'name' : OFTString
}
CITY_FIELDS = {
    'description' : 'City Shapefile',
    'id' : OFTInteger,
    'name' : OFTString
}

CATCHMENTS_FIELDS = {
    'description' : 'Catchments Shapefile',
    'id' : OFTInteger,
    'park_type' : OFTInteger,
    'dsr_type' : OFTInteger
}

SA1_ABS_STATS_FIELDS = {
    'description' : 'ABS SA1 Population and Polygon Shapefile',
    'sa1_7digit': OFTString,
    'tot_p_p': OFTInteger,
    'age_0_4__2': OFTInteger,
    'age_5_14_2': OFTInteger,
    'age_15_192': OFTInteger,
    'age_20_242': OFTInteger,
    'age_25_342': OFTInteger,
    'age_35_442': OFTInteger,
    'age_45_542': OFTInteger,
    'age_55_642': OFTInteger,
    'age_65_742': OFTInteger,
    'age_75_842': OFTInteger,
    'age_85ov_p': OFTInteger
}

LGA_ABS_STATS_FIELDS = {
    'description' : 'ABS LGA Population CSV File',
    'lga_code' : OFTString,
    'tot_p_p': OFTInteger,
    'age_0_4__2': OFTInteger,
    'age_5_14_2': OFTInteger,
    'age_15_192': OFTInteger,
    'age_20_242': OFTInteger,
    'age_25_342': OFTInteger,
    'age_35_442': OFTInteger,
    'age_45_542': OFTInteger,
    'age_55_642': OFTInteger,
    'age_65_742': OFTInteger,
    'age_75_842': OFTInteger,
    'age_85ov_p': OFTInteger
}

SUBURB_ABS_STATS_FIELDS = {
    'description' : 'ABS Suburb Population CSV File',
    'ssc_code' : OFTString,
    'tot_p_p': OFTInteger,
    'age_0_4__2': OFTInteger,
    'age_5_14_2': OFTInteger,
    'age_15_192': OFTInteger,
    'age_20_242': OFTInteger,
    'age_25_342': OFTInteger,
    'age_35_442': OFTInteger,
    'age_45_542': OFTInteger,
    'age_55_642': OFTInteger,
    'age_65_742': OFTInteger,
    'age_75_842': OFTInteger,
    'age_85ov_p': OFTInteger
}

FACILITY_FIELDS = {
    'description'                   : 'Facility CSV file',
    'posid'                         : OFTInteger,
    'partid'                        : OFTInteger,
    'uid'                           : OFTInteger,
    POS_FACILITY_CHOICE_TENNIS      : OFTInteger,
    POS_FACILITY_CHOICE_SOCCER      : OFTInteger,
    POS_FACILITY_CHOICE_FOOTBALL    : OFTInteger,
    POS_FACILITY_CHOICE_NETCOURT    : OFTInteger,
    POS_FACILITY_CHOICE_CRICKET     : OFTInteger,
    POS_FACILITY_CHOICE_BASEBALL    : OFTInteger,
    POS_FACILITY_CHOICE_FITNESS     : OFTInteger,
    POS_FACILITY_CHOICE_BASKETHOOP  : OFTInteger,
    POS_FACILITY_CHOICE_HOCKEY      : OFTInteger,
    POS_FACILITY_CHOICE_ATHLETICS   : OFTInteger,
    POS_FACILITY_CHOICE_RUGBY       : OFTInteger,
    POS_FACILITY_CHOICE_SKATEBMX    : OFTInteger,
    POS_FACILITY_CHOICE_OTHER       : OFTString,
    POS_FACILITY_CHOICE_PLAYGROUND  : OFTInteger,
    POS_FACILITY_CHOICE_FORESHORE   : OFTInteger,
    POS_FACILITY_CHOICE_LAKEPOND    : OFTInteger,
    POS_FACILITY_CHOICE_FOUNTAIN    : OFTInteger,
    POS_FACILITY_CHOICE_STREAM      : OFTInteger,
    POS_FACILITY_CHOICE_WETLAND     : OFTInteger,
    POS_FACILITY_CHOICE_WILDLIFE    : OFTInteger,
    POS_FACILITY_CHOICE_GARDENS     : OFTInteger,
    POS_FACILITY_CHOICE_NOTHING     : OFTInteger,
    POS_FACILITY_CHOICE_TREES       : OFTInteger,
    POS_FACILITY_CHOICE_PATHS       : OFTInteger,
    POS_FACILITY_CHOICE_PATHSHADE   : OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE0  : OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE1  : OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE2  : OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE3  : OFTInteger,
    POS_FACILITY_CHOICE_PLAYSHADE   : OFTInteger,
    POS_FACILITY_CHOICE_PLAYFENCE   : OFTInteger,
    POS_FACILITY_CHOICE_GRASSRETIC  : OFTInteger,
    POS_FACILITY_CHOICE_DOGS        : OFTInteger,
    POS_FACILITY_CHOICE_BBQ         : OFTInteger,
    POS_FACILITY_CHOICE_SEAT        : OFTInteger,
    POS_FACILITY_CHOICE_PICNIC      : OFTInteger,
    POS_FACILITY_CHOICE_KIOSK       : OFTInteger,
    POS_FACILITY_CHOICE_TOILETS     : OFTInteger,
    POS_FACILITY_CHOICE_ART         : OFTInteger,
    POS_FACILITY_CHOICE_CARPARK     : OFTInteger,
    POS_FACILITY_CHOICE_LIGHTING    : OFTInteger,
    POS_FACILITY_CHOICE_LIGHTFEAT   : OFTInteger
}
# Define field names for area and population stats
AREA_POP_PARK_TYPE = 'park_type'
AREA_POP_DSR_TYPE = 'DSR_type'
AREA_POP_PLAYGROUND_COUNT = 'playground_count'
AREA_POP_PERC_PLAYGROUND = 'perc_playground'
AREA_POP_FREQUENCY = 'frequency'
AREA_POP_SUM_AREA_HA = 'sum_area_ha'
AREA_POP_PERCENTPARK = 'percentpark'
AREA_POP_PERCENTPOS = 'percentpos'
AREA_POP_PERCENTSUBLGA = 'percentsublga'
AREA_POP_SUM_PERCENTTOTALPOP = 'percenttotalpop'
AREA_POP_SUM_PERCENTPOP0TO4 = 'percentpop0to4'
AREA_POP_SUM_PERCENTPOP5TO14 = 'percentpop5to14'
AREA_POP_SUM_PERCENTPOP15TO19 = 'percentpop15to19'
AREA_POP_SUM_PERCENTPOP20TO24 = 'percentpop20to24'
AREA_POP_SUM_PERCENTPOP25TO34 = 'percentpop25to34'
AREA_POP_SUM_PERCENTPOP35TO44 = 'percentpop35to44'
AREA_POP_SUM_PERCENTPOP45TO54 = 'percentpop45to54'
AREA_POP_SUM_PERCENTPOP55TO64 = 'percentpop55to64'
AREA_POP_SUM_PERCENTPOP65TO74 = 'percentpop65to74'
AREA_POP_SUM_PERCENTPOP75TO84 = 'percentpop75to84'
AREA_POP_SUM_PERCENTPOPOVER85 = 'percentpopover85'
AREA_POP_SUM_PERCENTTOTALPOPDSR = 'percenttotalpopdsr'
AREA_POP_SUM_PERCENTPOP0TO4DSR = 'percentpop0to4dsr'
AREA_POP_SUM_PERCENTPOP5TO14DSR = 'percentpop5to14dsr'
AREA_POP_SUM_PERCENTPOP15TO19DSR = 'percentpop15to19dsr'
AREA_POP_SUM_PERCENTPOP20TO24DSR = 'percentpop20to24dsr'
AREA_POP_SUM_PERCENTPOP25TO34DSR = 'percentpop25to34dsr'
AREA_POP_SUM_PERCENTPOP35TO44DSR = 'percentpop35to44dsr'
AREA_POP_SUM_PERCENTPOP45TO54DSR = 'percentpop45to54dsr'
AREA_POP_SUM_PERCENTPOP55TO64DSR = 'percentpop55to64dsr'
AREA_POP_SUM_PERCENTPOP65TO74DSR = 'percentpop65to74dsr'
AREA_POP_SUM_PERCENTPOP75TO84DSR = 'percentpop75to84dsr'
AREA_POP_SUM_PERCENTPOPOVER85DSR = 'percentpopover85dsr'
AREA_POP_STATS_FIELDS = {
    'description'                   : 'Area and Population Statistics file',
    'sub_lga_code'                  :   OFTString,
    AREA_POP_PARK_TYPE              :   OFTInteger,
    AREA_POP_DSR_TYPE               :   OFTInteger,
    AREA_POP_PLAYGROUND_COUNT       :   OFTInteger,
    AREA_POP_PERC_PLAYGROUND        :   OFTReal,
    AREA_POP_FREQUENCY              :   OFTInteger,
    AREA_POP_SUM_AREA_HA            :   OFTReal,
    AREA_POP_PERCENTPARK            :   OFTReal,
    AREA_POP_PERCENTPOS             :   OFTReal,
    AREA_POP_PERCENTSUBLGA          :   OFTReal,
    AREA_POP_SUM_PERCENTTOTALPOP    :   OFTReal,
    AREA_POP_SUM_PERCENTPOP0TO4DSR  :   OFTReal,
    AREA_POP_SUM_PERCENTPOP20TO24   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP5TO14    :   OFTReal,
    AREA_POP_SUM_PERCENTPOP15TO19   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP20TO24   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP25TO34   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP35TO44   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP45TO54   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP55TO64   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP65TO74   :   OFTReal,
    AREA_POP_SUM_PERCENTPOP75TO84   :   OFTReal,
    AREA_POP_SUM_PERCENTPOPOVER85   :   OFTReal,
    AREA_POP_SUM_PERCENTTOTALPOPDSR :   OFTReal,
    AREA_POP_SUM_PERCENTPOP0TO4DSR  :   OFTReal,
    AREA_POP_SUM_PERCENTPOP5TO14DSR :   OFTReal,
    AREA_POP_SUM_PERCENTPOP15TO19DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP20TO24DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP25TO34DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP35TO44DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP45TO54DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP55TO64DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP65TO74DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOP75TO84DSR:   OFTReal,
    AREA_POP_SUM_PERCENTPOPOVER85DSR:   OFTReal
}

FACILITIES_STATS_FIELDS = {
    'description'                   : 'Facilities Statistics file',
    'sub_lga_code'                  :           OFTString,
    'park_type'                     :           OFTInteger,
    POS_FACILITY_CHOICE_SOCCER      :           OFTInteger,
    POS_FACILITY_CHOICE_NETCOURT    :           OFTInteger,
    POS_FACILITY_CHOICE_BASEBALL    :           OFTInteger,
    POS_FACILITY_CHOICE_BASKETHOOP  :           OFTInteger,
    POS_FACILITY_CHOICE_ATHLETICS   :           OFTInteger,
    POS_FACILITY_CHOICE_SKATEBMX    :           OFTInteger,
    POS_FACILITY_CHOICE_LAKEPOND    :           OFTInteger,
    POS_FACILITY_CHOICE_STREAM      :           OFTInteger,
    POS_FACILITY_CHOICE_GARDENS     :           OFTInteger,
    POS_FACILITY_CHOICE_PATHS       :           OFTInteger,
    POS_FACILITY_STAT_CHOICE_PLAYFENCE_NO_0:    OFTInteger,
    POS_FACILITY_STAT_CHOICE_DOGS_NO_0:         OFTInteger,
    POS_FACILITY_CHOICE_SEAT        :           OFTInteger,
    POS_FACILITY_CHOICE_KIOSK       :           OFTInteger,
    POS_FACILITY_CHOICE_ART         :           OFTInteger,
    POS_FACILITY_CHOICE_LIGHTING    :           OFTInteger,
    POS_FACILITY_CHOICE_LIGHTFEAT   :           OFTInteger,
    POS_FACILITY_CHOICE_CARPARK     :           OFTInteger,
    POS_FACILITY_CHOICE_TOILETS     :           OFTInteger,
    POS_FACILITY_CHOICE_PICNIC      :           OFTInteger,
    POS_FACILITY_CHOICE_BBQ         :           OFTInteger,
    POS_FACILITY_CHOICE_GRASSRETIC  :           OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE   :           OFTInteger,
    POS_FACILITY_STAT_CHOICE_PATHSHADE_NO_0:    OFTInteger,
    POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_POOR_1:  OFTInteger,
    POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_MEDIUM_2: OFTInteger,
    POS_FACILITY_STAT_CHOICE_PATHSHADE_YES_GOOD_3:  OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE0  :           OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE1  :           OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE2  :           OFTInteger,
    # POS_FACILITY_CHOICE_PATHSHADE3  :           OFTInteger,
    POS_FACILITY_CHOICE_WILDLIFE    :           OFTInteger,
    POS_FACILITY_CHOICE_WETLAND     :           OFTInteger,
    POS_FACILITY_CHOICE_FOUNTAIN    :           OFTInteger,
    POS_FACILITY_CHOICE_PLAYGROUND  :           OFTInteger,
    POS_FACILITY_CHOICE_RUGBY       :           OFTInteger,
    POS_FACILITY_CHOICE_HOCKEY      :           OFTInteger,
    POS_FACILITY_CHOICE_FITNESS     :           OFTInteger,
    POS_FACILITY_CHOICE_CRICKET     :           OFTInteger,
    POS_FACILITY_CHOICE_FOOTBALL    :           OFTInteger,
    POS_FACILITY_CHOICE_TENNIS      :           OFTInteger,
    POS_FACILITY_STAT_CHOICE_PLAYFENCE_YES_1:   OFTInteger,
    POS_FACILITY_STAT_CHOICE_DOGS_YES_1:        OFTInteger,
    POS_FACILITY_STAT_CHOICE_PLAYSHADE_PARTIAL_1:OFTInteger,
    POS_FACILITY_STAT_CHOICE_PLAYSHADE_FULL_2:  OFTInteger,
    POS_FACILITY_STAT_CHOICE_TREES_YES_1_50_1:  OFTInteger,
    POS_FACILITY_STAT_CHOICE_DOGS_NO_INFO_2:    OFTInteger,
    POS_FACILITY_STAT_CHOICE_TREES_NO_0:        OFTInteger,
    POS_FACILITY_STAT_CHOICE_TREES_YES_50_100_2:OFTInteger,
    POS_FACILITY_STAT_CHOICE_TREES_YES_MORE_100_3:OFTInteger,
    POS_FACILITY_STAT_CHOICE_ADJ_PSF:           OFTInteger
}

ABS_STATS = (
    (AREA_POP_SUM_PERCENTTOTALPOP, 'tot_p_p'),
    (AREA_POP_SUM_PERCENTPOP0TO4, 'age_0_4_2'),
    (AREA_POP_SUM_PERCENTPOP5TO14, 'age_5_14_2'),
    (AREA_POP_SUM_PERCENTPOP15TO19, 'age_15_192'),
    (AREA_POP_SUM_PERCENTPOP20TO24, 'age_20_242'),
    (AREA_POP_SUM_PERCENTPOP25TO34, 'age_25_342'),
    (AREA_POP_SUM_PERCENTPOP35TO44, 'age_35_442'),
    (AREA_POP_SUM_PERCENTPOP45TO54, 'age_45_542'),
    (AREA_POP_SUM_PERCENTPOP55TO64, 'age_55_642'),
    (AREA_POP_SUM_PERCENTPOP65TO74, 'age_65_742'),
    (AREA_POP_SUM_PERCENTPOP75TO84, 'age_75_842'),
    (AREA_POP_SUM_PERCENTPOPOVER85, 'age_85ov_p')
)

ABS_FIELD_STATS = (
    (AREA_POP_SUM_PERCENTTOTALPOP, 'tot_p_p'),
    (AREA_POP_SUM_PERCENTPOP0TO4, 'age_0_4__2'),
    (AREA_POP_SUM_PERCENTPOP5TO14, 'age_5_14_2'),
    (AREA_POP_SUM_PERCENTPOP15TO19, 'age_15_192'),
    (AREA_POP_SUM_PERCENTPOP20TO24, 'age_20_242'),
    (AREA_POP_SUM_PERCENTPOP25TO34, 'age_25_342'),
    (AREA_POP_SUM_PERCENTPOP35TO44, 'age_35_442'),
    (AREA_POP_SUM_PERCENTPOP45TO54, 'age_45_542'),
    (AREA_POP_SUM_PERCENTPOP55TO64, 'age_55_642'),
    (AREA_POP_SUM_PERCENTPOP65TO74, 'age_65_742'),
    (AREA_POP_SUM_PERCENTPOP75TO84, 'age_75_842'),
    (AREA_POP_SUM_PERCENTPOPOVER85, 'age_85ov_p')
)

# User Job Choices
USER_JOB_CHOICE_ACADEMIC = 'ACADEMIC'
USER_JOB_CHOICE_PLANNER = 'PLANNER'
USER_JOB_CHOICE_DEVELOPER = 'DEVELOPER'
USER_JOB_CHOICE_OTHER = 'OTHER'

USER_JOB_CHOICES = (
    (USER_JOB_CHOICE_ACADEMIC, 'Academic'),
    (USER_JOB_CHOICE_PLANNER, 'Planner'),
    (USER_JOB_CHOICE_DEVELOPER, 'Developer'),
    (USER_JOB_CHOICE_OTHER, 'Other')
)
